﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace CAD_Project_1
{
    class Log
    {
        private StreamWriter sw;        
        private string path;
       
        public Log(string path) {
            this.path = path;
            sw = new StreamWriter(path);           
        }

        public Log(string path, Boolean append) {
            this.path = path;
            sw = new StreamWriter(path,true);                   
        }

        public void writeLog(string text) {
            sw.WriteLine(text);
        }

        public void closeLog() {
            sw.Flush();
            sw.Dispose();
            sw.Close();        
        }

         public string Path
        {
            get { return path; }
            set { path = value; }
        }


    }
}
